Image processing apparatus with binarization-error dispersal

ABSTRACT

An image processing apparatus for digitizing an analog image by dispersing the digitizing error to the surrounding areas. The characteristics or edge of the analog image are identified, and the error dispersing area is varied according to the result of identification, thus enabling reproduction of the image with high quality regardless of the nature of the original image.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an image processing apparatus forprocessing an image in digital manner.

2. Related Background Art

Conventional analog copying machines are being replaced by so-calleddigital copying machines, in which an original image is sampled forexample with a CCD sensor, and the image is reproduced from thedigitized data through a digital printer such as a laser beam printer,owing to the progress in digital devices.

In such digital copying machines, a dither method or density patternmethod is employed for reproducing intermediate tones. Such methods havehowever been associated with following drawbacks:

(1) If the original image has screen dots, as in a printed image, thecopied image shows periodic stripe patterns not present in the originalimage; and

(2) If the original image contains lines or characters, the edges ofsuch lines or characters are broken by the dither process, and the imagequality is deteriorated.

The phenomenon (1), called Moire patterns, arises from:

(A) beats between the screen dots of the original image and the samplingoperation; or

(B) beats between the screen dots of the original image and the ditherthreshold matrix.

The phenomenon (B) is particularly apparent when the dither thresholdvalues are arranged in a dot concentrated pattern. In such case theoutput image has a pseudo-screen dot pattern, which generates beats withthe screen dots of the original image, thus leading to a Moirephenomenon.

For digitization of an original image, there is also known an errordispersion method, in which the difference between the density of theoriginal image and the density of the output image is calculated foreach pixel, and the error obtained from said calculation is dispersed tothe surrounding pixels with a certain weighting. This method wasreported by R. W. Floyd and L. Steinberg in "An Adaptive Algorithm forSpatial Grey Scale", SID 17, pp. 75-77 (1976). This method does notgenerate Moire patterns in the reproduction from a screen dot image, asit lacks periodicity in the process, in comparison with the dithermethod. However, it is still associated with certain drawbacks such asstripe patterns in the output image specific to this method, andgranular noise in the highlight areas or dark areas of the image.

SUMMARY OF THE INVENTION

An object of the present invention is to eliminate the drawbacks of theconventional technologies explained above.

Another object of the present invention is to provide an improvement onimage processing apparatus.

Still another object of the present invention is to provide an imageprocessing apparatus capable of precisely reproducing an image with highquality, regardless of the nature of the original image.

Still another object of the present invention is to provide an imageprocessing apparatus capable of identifying the characteristics of theimage and varying the area for dispersing the error generated in thedigitization of the image, according to the result of saididentification.

Still another object of the present invention is to provide an imageprocessing apparatus capable of detecting the amount of edges in theimage and varying the area for dispersing the error generated in thedigitization of the image, according to the result of said detection.

Still another object of the present invention is to provide an imageprocessing apparatus capable of identifying the nature of the image andvarying the process of the error dispersing method, according to theresult of said identification.

The foregoing and still other objects of the present invention, and theadvantages thereof, will become fully apparent from the followingdescription to be taken in conjunction with the attached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a first embodiment of the image processingapparatus of the present invention;

FIG. 2 is a block diagram of an example of a discrimination circuit;

FIG. 3 is a block diagram of a Laplacian processor;

FIGS. 4A to 4C are charts showing examples of Laplacian coefficients;

FIG. 5A is a block diagram of a calculation unit 27;

FIG. 5B is a block diagram of a circuit for calculating the differencebetween the density of a central pixel and the average density ofsurrounding pixels;

FIG. 6 is a block diagram of a digitizing circuit of error dispersionmethod in the first embodiment;

FIG. 7A is a chart showing weighting coefficients of a large matrix;

FIG. 7B is a chart showing weighting coefficients of a small matrix;

FIG. 8 is a block diagram of a color image processing apparatusembodying the present invention;

FIG. 9 is a block diagram of a discrimination circuit in FIG. 8;

FIG. 10 is a block diagram of a second embodiment of the discriminationcircuit shown in FIG. 8;

FIG. 11 is a block diagram of another embodiment of the discriminationcircuit;

FIG. 12 is a block diagram of a maximum or minimum detecting circuit;

FIG. 13 is a block diagram of a comparison-selection circuit;

FIG. 14 is a block diagram showing another embodiment of thediscrimination circuit;

FIG. 15 is a block diagram showing a second embodiment of the imageprocessing apparatus of the present invention;

FIG. 16 is a block diagram of an embodiment of an edge detectingcircuit;

FIG. 17 is a block diagram of a Laplacian processor;

FIGS. l8A to l8C are charts showing examples of Laplacian coefficients;

FIG. 19 is a block diagram of a digitizing circuit of error dispersionmethod in the second embodiment;

FIGS. 20A to 20C are charts showing weighting coefficients of adispersion matrix of the error dispersion method;

FIG. 21 is a block diagram of a circuit for varying the weightingcoefficients according to an edge signal; and

FIG. 22 is a block diagram of a color image forming apparatus in whichthe second embodiment of the present invention is applied.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Now the present invention will be clarified in detail by embodimentsthereof shown in the attached drawings.

FIG. 1 is a block diagram of an image processing apparatus embodying thepresent invention, wherein image 5 data, read by an input sensor unit 10provided with a photoelectric converting device such as a CCD and adriving system for said device, are supplied in succession to an A/Dconverter 11, for converting each pixel into digital data for example of8 bits. In this manner the original image is digitized into data of 256levels. Then a correction circuit 12 executes digital correctionprocesses, such as shading correction for compensating the unevenness inthe sensitivity of sensor and the unevenness in the illumination by alight source. The corrected signal 100 is then supplied to adiscrimination circuit 13 and two binary digitizing circuits 14, 15.

The discrimination circuit 13 generates a discrimination signalindicating the nature of the input image, based on the image signal, andshifts a switch 16 by said discrimination signal.

The first binary digitizing circuit 14 executes binary digitization byan error dispersion method in which the error is dispersed with arelatively large matrix. On the other hand, the second binary digitizingcircuit 15 executes binary digitization by an error dispersion method inwhich the error is dispersed with a relatively small-size matrix.

Example of discrimination 1

The error dispersion method is characterized as follows according to thesize of the error dispersing matrix:

Large matrix size: stripe patterns in the intermediate density area arerelatively fine and not conspicuous, but white areas are often generatedat right to and below the edges of characters;

Small matrix size: stripe patterns in the inter-mediate density area arerelatively extensive and conspicuous, but no white areas are generatedadjacent to the edges of the characters.

Thus, the switch 16 is shifted to select the first digitized outputsignal or the second digitized output signal, according to the output ofthe discrimination circuit 13.

The binary signal is then used for turning on and off the dots in abinary printer 17, thus forming an image.

FIG. 2 is a block diagram showing an example of the discriminationcircuit 13 for discriminating characters and screen dots (edge portions)from photographs and background (non-edge portions).

The image signal 100 corrected by the correction circuit 12 is suppliedto one of line buffers 21a-21d selected by a selector 20. While one ofthe line buffers 21a-21_(d) is in writing operation, the other three arein reading operation. When the first line buffer 21a is filled with theimage data 100, the succeeding data are stored in the second line buffer21b, then third and fourth line buffers 21c, 21d, and, when said fourthline buffer is filled, the data writing returns to the first line buffer21a.

Consequently, the data of three consecutive lines, preceding the linecurrently in writing operation, are stored in the line buffers. Saiddata are selected by a selector 22, and supplied to a calculation unit23 for a Laplacian processing wi&h coefficients as shown in FIG. 4A.FIG. 3 is a block diagram of an example of said calculation unit 23. InFIG. 3, 30a-30e indicate the positions of the pixel data. The imagesignal of a central pixel 30c is multiplied by a constant in amultiplier 31, and is then supplied to a subtracter 33.

On the other hand, the signals of surrounding pixels 30a, 30b, 30d and30e are added in an adder 32, of which output is supplied to thesubtracter 33 for calculating the difference from the output of themultiplier 31. The resulting output 105 is stored in one of line buffers25a-25d selected by a selector 24 shown in FIG. 2. The output signals105 of consequtive three lines, stored in the line buffers 25a-25d, aresupplied, by a selector 26, to a consequtive calculating unit 27.

The calculating unit 27 calculates the total sum of the output signals105 in a block of 3×3 pixels. FIG. 5A is a block diagram of the presentembodiment. Pixel signals 50a-50i are data supplied from the linebuffers 25a-25d,and the total sum S of said data is calculated by theadder 54. Then a comparator 28 compares the obtained sum with apredetermined threshold value T1 to obtain the result 101 ofdiscrimination.

Said result of discrimination 101 is: "0" corresponding to charactersand screen dots (edge portion) if the sum S is larger than thresholdvalue T1; or

"1" corresponding to photographs and background (non-edge area) if thesum S is smaller than threshold value T1.

Said result 101 is supplied to the switch 16 to select:

the first binary digitized data if the result is "1"; or

the second binary digitized data if the result is "0".

The coefficients of the Laplacian filter of the present embodiment areshown in FIG. 4A, but similar results can be obtained with circuits ofthe coefficients as shown in FIG. 4B or 4C.

The discrimination circuit 13 may also be so constructed as to obtainthe result of discrimination by comparing the absolute value ofdifference in density between the central pixel and surrounding pixels,with a threshold value, as shown in FIG. 5B. An average calculation unit51 calculates the average density of the central pixel 50e and thesurrounding pixels 50a, 50b, 50c, 50d, 50f, 50g, 50h and 50i, and adifferential calculation unit 52 calculates the absolute value D of thedifference between said average density and the density of the centralpixel 50e. Then a comparator 53 compares said absolute value with apredetermined threshold value T2 to obtain the result 101 ofdiscrimination. Said result of discrimination is:

"0" corresponding to characters and screen dots (edge area) if thedifference D1 is larger than threshold value T2; or

"1" corresponding to photographs and background (non-edge area) if thedifference D1 is smaller than threshold value T2.

As an alternative method, it is also possible to calculate thedifference between the maximum and minimum values of the image data inan m×n pixel block and to compare said difference with a predeterminedthreshold value to obtain the result 101 of discrimination.

Said result of discrimination is:

"0" corresponding to characters and screen dots (edge area) if thedifference is larger than the threshold value; or

"1" corresponding to photographs and background (non-edge area) if thedifference is smaller than threshold value.

This method of discrimination allows one to obtain a reproduced imagewith high image quality from an original image containing characters,line-tone image, photographs and screen dot images, by selecting thebinary digitized signal according to the image areas in the followingmanner:

for photographs and background (non-edge area); binary digitization byerror dispersion method with a large matrix;

for characters, linetone images and screen dot images (edge area);binary digitization by error dispersion method with a small matrix.

More specifically, the edge area and non-edge area are discriminated inthe image, and, in the edge area, the error dispersion method isconducted with a smaller matrix. The formation of white areas adjacentto the line edges can therefore be prevented, and the use of a smallermatrix reduces the area of error dispersion, thereby reproducingcharacters and lines in precise manner.

In the non-edge area, the error dispersion method is conducted with alarger matrix, so that it is possible to prevent the formation of stripepatterns specific to this method in the photograph area or in thebackground area. Also the use of a larger matrix increases the area oferror dispersion, thereby providing a smoother output image.

In the foregoing it has been explained to vary the size of the matrix inthe error dispersion method by discriminating the edge area and non-edgearea of the image. In the following there will be explained anembodiment in which the matrix size is varied according to thediscrimination of image density.

Example of discrimination 2

The error dispersion method is characterized as follows according tosize of the error dispersing matrix:

Large matrix size: dots are relatively uniform in the highlight andshadow areas and noises are not conspicuous, but white areas are oftengenerated at right to and below the edges of characters;

Small matrix size: dots in highlight and shadow areas are random in sizeand noises are conspicuous, but no white areas are generated adjacent tothe edges of characters.

FIG. 11 is a block diagram of an embodiment of the discriminationcircuit 13 for discriminating a highlight area, a shadow area and anintermediate density area. The image signal 100 after correction issupplied to one of line buffer memories 121a-121d selected by a selector120. While one of the line buffers 121a-121d is in writing operation,the other three are in reading operation. When the first line buffer121a is filled with the image data 100, the succeeding data are storedin the second line buffer 12b, then third and fourth line buffers 21c,21d, and, when said fourth line buffer is filled, the data writingreturns to the first line buffer 121a.

Consequently, the data of three consequtive lines, preceding the linecurrently in writing operation, are stored in the line buffers. Saiddata are selectively read by a selector 122, and supplied to a maximumvalue detecting circuit 123 and a minimum value detecting circuit 124.The maximum and minimum values detected therein are respectivelycompared with threshold values T5, T6 by comparators 125, 126. Theresult of discrimination is "1" if the maximum value is equal to orlarger than the threshold value T5, or if the minimum value is equal toor smaller than the threshold value T6. An OR gate 127 calculates thelogic sum of these two outputs, thus providing the result 101 ofdiscrimination. In summary:

if maximum value≧T5, output is "1" (highlight);

if minimum value≦T6, output is "1" (shadow); or

in other cases, output is "0" (intermediate density); wherein 0< T5<<T6.

FIG. 12 is a block diagram of an embodiment of the maximum detectingcircuit 123 and the minimum detecting circuit 124. The image data 102a,103a, 104a of the lines selected by the selector 22 are delayed pixel bypixel in latches 130a-130c, 131a-131c, 132a-132c.

A comparator/selector 133a compares the data of the latches 131a and132a, thus conducting a comparison of the signal of a pixel and that ofan immediately following pixel. Similarly a comparator 134a compares theoutput of the comparator 133a with the signal of second following pixel.Consequently the output of the comparator 134a represents the maximum orminimum value of three consecutive pixels in a line. FIG. 13 shows anexample of a comparator/selector in the maximum detector 123. Inputs Xand Y are supplied to a comparator 140, and respectively to latches 141,142.

The comparator 140 is so constructed as to provide an output "1" in caseof X>Y. This output signal is supplied, through an inverter 143, to anenable terminal of a latch 141. If the enable input of the latches 141,142 is based on negative logic, the output signal 145 is equal to X incase of X>Y, or equal to Y in case of X<Y. Therefore the maximum valueof the signals X and Y is given as the output signal 145.

On the other hand, the minimum detector 124 can be of a same structure,except that the inverter 143 is connected to the latch 142.

A comparator/selector 135 detects the maximum or minimum value of thefirst and second lines, and a comparator/selector 136 detects themaximum or minimum value of thus obtained result and the third line.

Consequently, the output of a comparator/selector 136 represents themaximum or minimum value of a block of 3×3 pixels.

FIG. 14 shows another embodiment of the discrimination circuit, whereinpixel data 50a-50i are supplied to an average calculator 151 to obtainan average value of the block of 3×3 pixels. The obtained result M iscompared, in a comparator 152, with threshold value T7 and T8 (T7>T8).

By the following definitions according to the magnitude of the averagevalue M:

M>T7 shadow area;

M<T8 highlight area;

T8≦M≦T7 intermediate density area;

there can be obtained the following results of discrimination:

output "1" for M>T7 or M<T8;

output "0" for T8≦M ≦T7

Since granular noise is particularly conspicuous in the highlight area,it is also possible, as a simplified method, to use the first binarydigitizing means only in the highlight areas.

This method of discrimination allows to obtain a reproduced image withhigh image quality from an original image containing characters,line-tone image, photographs and screen dot images, by selecting thebinary digitizing process according to the image areas in the followingmanner:

highlight and shadow areas: binary digitizing with error dispersionmethod employing a large matrix; and

intermediate density areas: binary digitizing with error dispersionmethod employing a small matrix.

In the highlight and shadow areas of the image, the error dispersionmethod with a large matrix disperses the error generated in thedigitizaiton into a large area, in comparison with the case of employinga small matrix, thereby providing a smooth reproduced image. In thismanner it is rendered possible to obtain an image without the sensiblenoises and to prevent the formation of stripe patterns.

In the intermediate density areas of the image, the error dispersionmethod with a small matrix reduces the area of error dispersion, therebyimproving the resolving power. In this manner it is rendered possible tosatisfactorily reproduce the image with intermediate tones.

In the following there will be explained the error dispersion methodconducted in the first binary digitizing unit 14 and the second binarydigitizing unit 15 shown in FIG. 1.

FIG. 6 is a block diagram of an embodiment of a binary digitizingprocess unit employing error dispersion method. Image signal 100(X_(ij)) is added, in an adder 62, to the error ε_(ij) which is storedin an error buffer memory 60, multiplied by a weighting coefficientα_(kl) and normalized by division with Σα_(kl) as represented by afollowing formula: ##EQU1## The error ε_(ij) stored in the error buffermemory 60 is the difference between a corrected signal X'_(ij) added inthe adder 62 immediately before the currently processed signal and thebinary digitized output signal y_(ij). The error buffer memory shown inFIG. 6 indicates error a-l generated in 12 pixels around the currentlyprocessed signal. A weighting generation unit 61 multiplies the errorsε_(ij) (a-l) stored in the error buffer memory 60 respectively withweighting coefficients α_(kl) shown in FIG. 7A or 7B, utilizing a largematrix shown in FIG. 7A for the first binary digitizing unit 14 and asmall matrix shown in FIG. 7B for the second binary digitizing unit 15.

The corrected signal X'_(ij) obtained by addition in the adder 62 isthen compared with a threshold value T4 in a binary digitizing unit 63to provide an output y_(ij), which assumes the form of binary digitizedvalues for example y_(max) and y_(min), such as 255 and 0.

Said binary digitized signal is synchronized, in an output buffer 65,with the aforementioned output 101 of discrimination by thediscrimination unit 13, thereby providing a binary digitized output 102(103).

On the other hand, in a calculation unit 64, a difference or an errorε_(ij) between the corrected signal X'_(ij) and the output signal Y_(ij)is calculated and stored in a buffer memory, corresponding to a pixelposition 66 currently under processing in the buffer memory 60.Succeeding image signal is processed in a similar manner, so that eacherror ε_(ij) in the error buffer memory 60 is displaced to the right byone pixel. The binary digitization of the error dispersion method isachieved by repeating the above-explained procedure.

FIGS. 7A and 7B show examples of weighting coefficient matrix, whereinFIG. 7A shows weighting coefficients of a large matrix size employed inthe first binary digitizing circuit, while FIG. 7B shows those of asmall matrix size employed in the second binary digitizing circuit.

FIG. 8 is a block diagram of an embodiment applied to a color image. Acolor image input unit 90 releases red signal, green signal and bluesignal obtained by color separation. These signals are converted, in anA/D converter 91, into digital signals of 8 bits for each color. Then acorrection circuit 92 performs a shading correction, a complementarycolor conversion from R, G and B signals to Y, M and C signals, and amasking process to generate yellow signal, magenta signal and cyansignal. These three color signals are supplied to a discriminationcircuit 93, a first binary digitizing circuit 94 and a second binarydigitizing circuit 95. Each of the binary digitizing circuits 94, 95 canbe realized by three sets of the aforementioned binary digitizingcircuit.

On the other hand, the discrimination circuit 93 is composed, as shownin FIG. 9, of three sets of a mono-color discrimination circuit 70, ofwhich outputs are passed through an OR gate 71 to obtain the result 110of discrimination.

FIG. 10 shows another embodiment in which a monocolor generation unit 72calculates the average value of the yellow, magenta and cyan signals,and said average value is supplied to a discrimination unit 73 to obtainthe result 110 of discrimination.

In the present embodiment, as explained in the foregoing, the errordispersion method is conducted with a large matrix in the non-edge area,highlight area and shadow area to prevent formation of the stripepatterns particularly conspicuous in the photograph, background,highlight and shadow areas, thereby providing a smooth reproduced imagewithout sensible noises.

Also the error dispersion method is conducted with a small matrix in theedge area and intermediate density area to reproduce the characters andline-tone images with a high resolving power and to reproducesatisfactory intermediate tone image with high image quality.

The discrimination circuit shown in the present embodiment is merely anexample, and may be composed of any circuit capable of discriminationcorresponding to the binary digitizing matrix employed in the errordispersion method. Also the size of matrix and the method of selectionthereof are not limited to those shown in the present embodiment.

In the foregoing embodiment the matrix size is varied in two levels, butin the following there will be explained an embodiment of switching thematrix size in a larger number of levels.

FIG. 15 is a block diagram of a second embodiment of the presentinvention. An input sensor unit 210, for reading an original image byscanning operation, is composed of a photoelectric converting devicesuch as CCD and a device for driving the same. An image signal read bythe input sensor unit 210 is supplied to an A/D converter 211 forconversion of each pixel into a digital signal of 8 bits, representing256 density levels. Then a correction circuit 212 executes, in digitalmanner, a shading correction for compensating the unevenness in thesensitivity of the CCD and the unevenness in the intensity ofillumination. The corrected signal 200 is then supplied to an edgedetection circuit 213 and a binary digitizing circuit 214. The edgedetection circuit 213 detects an edge component in the image, sends acorresponding signal 207 to the binary digitizing circuit 214 and variesthe matrix size therein according to said signal. The binary digitizingcircuit 214 executes binary digitizing with the error dispersion methodand sends a dot on/off signal 215 to a printer 215, which is a digitalprinter such as a laser beam printer or an ink jet printer, capable offorming an image with said dot on/off signal 201.

FIG. 16 is a block diagram showing the details of the edge detectioncircuit 213 shown in FIG. 15. The image signal 200 corrected by thecorrection circuit 12 in FIG. 15 is supplied to line buffers 221a-221dselected by a selector 220. The selector 220 selects one of said linebuffers for writing operation. When the first line buffer 221a is filledwith the image data 200, the succeeding data are stored in the secondline buffer 221b, then third and fourth line buffers 221c, 221d, and,when said fourth line buffer is filled, the data writing returns to thefirst line buffer 221a.

Consequently, the data of three consecutive lines, preceding the linecurrently in writing operation, are stored in the line buffers, and areselected by a selector 222 for reading. The data are sent to a maximumdetection circuit 223 and a minimum detection circuit 224. The maximumvalue 205 and the minimum value 206 are subjected to the calculation ofthe difference thereof in a subtractor 225, and said difference isconverted, in a level setting unit 226, into one of three level signals207 in the following manner:

level 1: max-min>Ta

level 2: Tb<max-min<Ta

level 3: max-min<Tb

wherein Ta and Tb are experimentally determined constants, and the level1 corresponds to large edges while the level 3 corresponds to smalledges.

The details of the maximum detecting circuit 223 and of the minimumdetecting circuit 224 are already shown in FIGS. 12 and 13 and will nottherefore be explained further.

FIG. 17 is a block diagram showing another embodiment for obtaining theedge detection output 207 shown in FIGS. 1 and 2. There are shown acentral pixel 250d and surrounding pixels 250a, 250b, 250d and 250e inthe data of three lines from the selector 222 shown in FIG. 16. Thesignal of the central pixel is multiplied by a constant in a multiplier251, and the result is supplied to a subtracter 253. On the other hand,the signals of the surrounding pixels are summed in an adder 252, andthe obtained sum is supplied to the subtracter 253. With the Laplaciancoefficients shown in FIG. 18A, the subtracter 253 provides an output:

    output 253=constant×(250c)-{(250a)+(250b)+(250d)+(250e)}

wherein the constant is 5.

The output of the subtracter 253 is supplied to a level setting unit 254to generate on of three level signals 207 according to said output.

The edge detection can also be achieved with the Laplacian coefficientsas shown in FIGS. 18B and 18C.

FIG. 19 shows an embodiment of the binary digitizing circuit utilizingthe error dispersion method, used as the digitizing circuit 214 in FIG.15. The image signal 200 (X_(ij)) is added, in an adder 262, to theerror ε_(ij), which is stored in an error buffer memory 260 and which,in a weighting unit 261, is multiplied by a weighting coefficient α_(kl)based on the edge level signal 207 shown in FIG. 16 or 17 and normalizedby division with Σα_(kl), as represented in the following formula:##EQU2## wherein the error ε_(ij) stored in the error buffer memory 260is the difference between the corrected signal X'_(ij) added immediatelybefore the currently processed signal in the adder 262. The error buffermemory 260 in FIG. 19 indicate the errors a-l of twelve pixelssurrounding the currently process signal. The weighting process unit 261multiplies the errors ε_(ij) (a-l) stored in the error buffer memory 260respectively with the weighting coefficients α_(kl) as shown in FIGS.20A-20C according to the edge level signal mentioned above. It is to benoted that the coefficients α_(kl) shown in the matrixes in FIGS.20A-20C are represented in values after division with Σα_(kl).

The corrected signal X'_(ij) in the adder 262 is compared, in a binarydigitizing circuit 263, with a threshold value Tc to generate a signaly_(ij), which assumes digitized forms for example y_(max) and y_(min),such as 255 and 0.

Said binary signal is synchronized, in an output buffer 265, with theaforementioned level signal 207 of the edge detecting circuit 213,thereby providing the final binary output signal 201.

On the other hand, a calculating unit 264 calculates the differenceε_(ij) of the corrected signal X'_(ij) the output signal Y_(ij), andsaid difference is stored in the buffer memory corresponding to theposition 266 of the pixel currently under processing in the error buffermemory 260. Succeeding data are similarly processed, so that the errorsε_(ij) in the error buffer memory 260 are displaced by one pixel to theright. The binary digitizing of the error dispersion method can beachieved by repeating the above-explained procedure.

FIG. 21 is a block diagram of a circuit for switching the matrix size inthe weighting process circuit 261, in response to the edge signal.

The matrix size is larger in FIG. 20B than in FIG. 20A, and in FIG. 20Cthan in FIG. 20B, as explained before. The error data 260a-260l of theerror buffer memory are respectively supplied to look-up tables (LUT)280a-280for executing multiplications according to respective weightingcoefficients. The obtained results are summed in an adder 281, and thenare added to the image signal in the adder 262. Said look-up table (LUT)can switch the weighting coefficients according to the level signal 207.Following table 1 shows the weighting coefficients in the respectivepixel positions, corresponding to edge level signals 1, 2 and 3. Thesmall matrix size in FIG. 20A corresponds to the edge level signal "1"with large edge component, while the medium matrix size in FIG. 20Bcorresponds to the edge level signal "2", and the large matrix size inFIG. 20C corresponds to the edge level signal "3" with small edgecomponent.

The above-explained structure allows to vary the size of the dispersionmatrix in the error dispersion method, in response to the edge levelsignal.

Also by suitably setting the values of the weighting coefficients ofTab. 1 in the same structure as in the present embodiment, it ispossible to switch to a matrix of different weighting distributionthough the matrix size remains same, and thus to obtain equivalenteffect.

                  TABLE 1                                                         ______________________________________                                                  Edge signal                                                         Pixel position                                                                            1            2      3                                             ______________________________________                                        a           0            0      1/48                                          b           0            1/18   3/48                                          c           0            2/18   5/48                                          d           0            1/18   3/48                                          e           0            0      1/48                                          f           0            0      3/48                                          g           1/6          3/18   5/48                                          h           2/6          4/18   7/48                                          i           1/6          3/18   5/48                                          j           0            0      3/48                                          k           0            0      5/48                                          l           2/6          4/18   7/48                                          ______________________________________                                    

FIG. 22 is a block diagram in which the foregoing embodiment is appliedto a color image. A color image input unit 90 releases color-separatedred, green and blue signals, which are converted, in an A/D converter291, into digital signals of 8 bits for each color. A color correctioncircuit 292 executes shading correction, complementary conversion fromR, G and B signals into Y, M and C signals and masking process togenerate yellow, magenta and cyan signals. These three color signals aresupplied to an edge detection circuit 293, and a binary digitizingcircuit 294, which has three sets of the binary digitizing circuit 214shown in FIG. 15. The edge detection circuit 243 can be composed of thecircuits shown in FIGS. 7 and 10. In this case the calculation units70a-70care designed to effect edge detection.

As explained in the foregoing, the second embodiment is capable ofvarying the size of dispersion matrix employed in the error dispersionmethod according to the amount of edge components, and reduces thematrix size when the amount of edge components is large therebypreventing the formation of white areas at the edges encountered when alarge matrix is used, and satisfactorily reproducing characters andline-tone images. Also when the amount of edge components is small, alarge dispersion matrix is used to prevent the formation of stripepatterns found in the use of a small matrix, thereby providing a smoothreproduced image without noises in the photograph and background areas.Besides, in comparison with the case of selecting either one of largeand small matrixes, the matrix size is stepwise selected according tothe amount of edge components, thereby preventing a sudden change in theimage quality 25 and allowing to obtain an even smoother reproducedimage.

In the foregoing second embodiment the matrix size is changed in threelevels according to the amount of edge components, but a still largernumber of matrix sizes may be employed in a similar structure.

Also in said embodiment the matrix size is switched according to theamount of the edge components, but it is also possible to switch thematrix size stepwise according to the image density.

In such case the edge detection circuit 213 shown in FIG. 15 can bereplaced by the average calculating unit 151 in FIG. 14 for determiningthe average density in the block and accordingly switching the matrixstepwise.

As explained in the foregoing, the image processing apparatus of thepresent embodiment is capable of varying the area of error dispersionaccording to the image characteristics, thus achieving imagereproduction of high image quality on any image such as characters,screen dot images and photographs.

The present invention is not limited to the foregoing embodiments but issubject to various modifications within the scope and spirit of theappended claims.

What is claimed is:
 1. An image processing apparatuscomprising:digitizing means for digitizing image data; process means fordispersing an error, generated at the digitizing by said digitizingmeans, in an area around the image data; and discrimination means fordiscriminating whether the image data corresponds to an edge area or anon-edge area, wherein said process means is adapted to enlarge the areafor error dispersion in a case of processing the image data of thenon-edge area, as compared with a case of processing the image data ofthe edge area.
 2. An apparatus according to claim 1, wherein saiddigitizing means is adapted to binary-digitize density data of an imagewith a predetermined threshold value.
 3. An apparatus according to claim2, wherein the error, to be dispersed by said process means in the areaaround the image data, is a difference between the density data of theimage and output density data after the binary digitizing.
 4. Anapparatus according to claim 3, wherein said process means is adapted todisperse the error in the area around the image data by means of amatrix, and to vary the area for error dispersion by varying the matrix.5. An image processing apparatus comprising:digitizing means fordigitizing image data; process means for dispersing an error, generatedat the digitizing by said digitizing means, in an area around the imagedata; and discrimination means for discriminating a density level of animage, wherein said process means is adapted to vary the area for errordispersion according to a result of discrimination performed by saiddiscrimination means, and wherein said process means is adapted to makethe area of error dispersion larger when the density level for the imageis smaller than a predetermined value, than when the density level islarger than the predetermined value.
 6. An apparatus according to claim5, wherein said digitizing means is adapted to binary-digitize densitydata of the image with a predetermined threshold value.
 7. An apparatusaccording to claim 6, wherein the error, to be dispersed by said processmeans in the area around the image data, is a difference between thedensity data of the image and output density data after the binarydigitizing.
 8. An apparatus according to claim 7, wherein said processmeans is adapted to disperse the error in the area around the image databy means of a matrix, and to vary the area for error dispersion byvarying the matrix.
 9. An image processing apparatuscomprising:digitizing means for digitizing image data; process means fordispersing an error, generated at the digitizing by said digitizingmeans, in an area around the image data; and discrimination means fordiscriminating a density level of an image, wherein said process meansis adapted to vary the area for error dispersion according to a resultof discrimination of said discrimination means, and wherein said processmeans is adapted to make the area for error dispersion larger when thedensity level of the image is larger than a predetermined value, thanwhen the density level is smaller than the predetermined value.
 10. Anapparatus according to claim 9, wherein said digitizing means is adaptedto binary digitize density data of the image with a predeterminedthreshold value.
 11. An apparatus according to claim 10, wherein theerror, to be dispersed by said process means in the area around theimage data, is a difference between the density data of the image andoutput density data after the binary digitizing.
 12. An apparatusaccording to claim 11, wherein said process means is adapted to dispersethe error in the area around the image data by means of a matrix, and tovary the area for error dispersion by varying said matrix.
 13. An imageprocessing method comprising the steps of:digitizing image data;dispersing an error, generated in the digitizing in said digitizingstep, into an area around the image data; and discriminating whether theimage data corresponds to an edge area or a non-edge area, wherein, insaid dispersing step, the area for error dispersion is made larger in acase of processing the image data of a non-edge area of an image than ina case of processing the image data of an edge area.
 14. A methodaccording to claim 13, wherein, in said digitizing step, the densitydata of the image is being digitized with a predetermined thresholdvalue.
 15. A method according to claim 14, wherein the error, to bedispersed in the area around the image data in said dispersing step, isa difference between the density data of the image and the outputdensity data after the binary digitizing.
 16. A method according toclaim 15, wherein, in said dispersing step, the error in the area aroundthe image data is dispersed by means of a matrix, and the area for errordispersion is varied by varying the matrix.
 17. An image processingmethod comprising the steps of:digitizing image data; dispersing anerror, generated in the digitizing in said digitizing step, into an areaaround the image data; and discriminating a density level of an image;wherein said dispersing step is adapted to vary the area for errordispersion according to a result of discrimination in saiddiscriminating step, and wherein, in said dispersing step, the area forerror dispersion is made larger in a case in which the density level ofthe image is smaller than a predetermined value, than in a case in whichthe density level is larger than the predetermined value.
 18. A methodaccording to claim 18, wherein, in said digitizing step, the densitydata of the image is binary digitized with a predetermined thresholdvalue.
 19. A method according to claim 18, wherein the error, to bedispersed in the area around the image data in said dispersing step, isa difference between the density data of the image and the outputdensity data after the binary digitizing.
 20. A method according toclaim 19, wherein, in said dispersing step, the error is dispersed inthe area round the image data by means of a matrix, and the area forerror dispersion is varied by varying the matrix.
 21. An imageprocessing method comprising the steps of:digitizing image data;dispersing an error, generated in the digitizing in said digitizingstep, into an area around the image data; and discriminating a densitylevel of an image, wherein said dispersing step is adapted to vary thearea for error dispersion according to a result of discrimination insaid discriminating step, and wherein, in said dispersing step, the areafor error dispersion is made larger in a case in which the density levelof the image is larger than a predetermined value, than in a case inwhich the density level is smaller than the predetermined value.
 22. Amethod according to claim 21, wherein said digitizing step is adapted tobinary-digitize the density data of the image with a predeterminedthreshold value.
 23. A method according to claim 22, wherein the error,to be dispersed in the area around the image data in said dispersingstep, is a difference between the density data of the image and theoutput density data after the binary digitizing.
 24. A method accordingto claim 23, wherein, in said dispersing step, the error is dispersed inthe area around the image data by means of a matrix, and the area forerror dispersion is varied by varying the matrix.
 25. An imageprocessing apparatus comprising:digitizing means for digitizing imagedata; process means for dispersing an error, generated at the digitizingby said digitizing means, in an area around the image data; anddiscrimination means for discriminating whether the image data exists inan edge area or a non-edge area, wherein said process means is adaptedto vary the area in which the error is dispersed, in accordance withwhether the image data exists in an edge area or a non-edge area.
 26. Anapparatus according to claim 25, wherein said digitizing means isadapted to binary-digitize density data of an image with a predeterminedthreshold value.
 27. An apparatus according to claim 26, wherein theerror, to be dispersed by said process means in the area around theimage data, is a difference between the density data of the image andthe output density data after the binary digitizing.
 28. An apparatusaccording to claim 27, wherein said process means is adapted to dispersethe error in the area around the image data by means of a matrix, and tovary the area for error dispersion by varying the matrix.
 29. An imageprocessing apparatus comprising:digitizing means for digitizing imagedata; process means for dispersing an error, generated at the digitizingby said digitizing means, in an area around the image data; andgenerating means for generating a signal representing whether an areaquantized by said digitizing means is an edge area or a non-edge area.wherein said process means makes larger the area for error dispersion ina case in which the signal representing non-edge area is generated bysaid generating means than in a case in which the signal representingedge area is generated.
 30. An apparatus according to claim 29, whereinsaid digitizing means is adapted to binary-digitize density data of animage with a predetermined threshold value.
 31. An apparatus accordingto claim 30, wherein the error, to be dispersed by said process means inthe area around the image data, is a difference between the density dataof the image and the output density data after the binary digitizing.32. An apparatus according to claim 31, wherein said process means isadapted to disperse the error in the area around the image data by meansof a matrix, and to vary the area for error dispersion by varying thematrix.
 33. An apparatus according to claim 29, further comprisingconversion means for inputting analog image data and converting theanalog image data into digital image data, and wherein said digitizingmeans quantizes the digital image data.
 34. An image processingapparatus comprising:input means for inputting digital image data;binarization means for binarizing the digital image data input by saidinput means by using a predetermined threshold value; calculation meansfor calculating a difference between the digital image data input bysaid input means and output data after the digital image data has beenbinarized, to provide error data; process means for processing such thatthe error data provided by said calculation means is dispersed to theperipheral digital image data; and discrimination means fordiscriminating a feature of an area in which the digital image datainput by said input means exists, wherein said process means is adaptedto vary the area in which the error data is dispersed, in accordancewith the feature discriminated by said discrimination means.
 35. Anapparatus according to claim 34, wherein said input means furthercomprises conversion means for converting analog image data obtained byreading an original image into the digital image data.
 36. An apparatusaccording to claim 34, wherein said discrimination means discriminateswhether the area in which the digital image data exists is an edge areaor a non-edge area.
 37. An apparatus according to claim 36, wherein saidprocess means varies the area in which the error data is dispersed, inaccordance with whether the area in which the digital image data existsis an edge area or a non-edge area.